package com.ag.hmk.action;

import java.util.List;

import com.ag.bean.TbUnit;
import com.ag.common.BaseAction;
import com.ag.hmk.service.impl.UnitServImpl;
/**
 * 
 * @author hmk
 * 查询所有物品单位记录
 */
public class GetUnitAction extends BaseAction {

	private static final long serialVersionUID = -3288549226610223613L;
	private UnitServImpl unitServImpl;
	
	private List<TbUnit> unitList;
	
	/*
	 * 查询所有物品单位记录
	 */
	public String findAll()throws Exception{
		List<TbUnit> uList = null;
		try {
			uList = unitServImpl.findAll();
		} catch (Exception e) {
			e.printStackTrace();
			uList = null;
		}
		this.setUnitList(uList);
		System.out.println("--------get all unit ok");
		return "getUnitOK";
	}
	

	public List<TbUnit> getUnitList() {
		return unitList;
	}

	public void setUnitList(List<TbUnit> unitList) {
		this.unitList = unitList;
	}

	public void setUnitServImpl(UnitServImpl unitServImpl) {
		this.unitServImpl = unitServImpl;
	}
	

}
